﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.ServiceModel;
using System.ServiceModel.Web;
using System.Text;
using System.Threading.Tasks;
using AgileNYCWebService.Manager.Data;
using AgileNYCWebService.Manager.Data.Table;

namespace AgileNYCWebService
{
	[ServiceContract]
	interface IAgileEvents
	{
		[OperationContract]
		[return: MessageParameter(Name = "Result")]
		[WebInvoke(Method = "GET",
			ResponseFormat = WebMessageFormat.Json,
			BodyStyle = WebMessageBodyStyle.Wrapped,
			UriTemplate = "Events?usertoken={userToken}&offset={offset}&limit={limit}")]
		string Events(string userToken, int offset, int limit);

		[OperationContract]
		[return: MessageParameter(Name = "Result")]
		[WebInvoke(Method = "GET",
			ResponseFormat = WebMessageFormat.Json,
			BodyStyle = WebMessageBodyStyle.Wrapped,
			UriTemplate = "CheckIn?usertoken={userToken}&eventId={eventId}&isCheckIn={isCheckIn}")]
		string CheckIn(string userToken, int eventId, bool isCheckIn);

		[OperationContract]
		[return: MessageParameter(Name = "Result")]
		[WebInvoke(Method = "GET",
			ResponseFormat = WebMessageFormat.Json,
			BodyStyle = WebMessageBodyStyle.Wrapped,
			UriTemplate = "Rating?usertoken={userToken}&eventId={eventId}&ratingValue={ratingValue}")]
		string Rating(string userToken, int eventId, float ratingValue);

		[OperationContract]
		[return: MessageParameter(Name = "Result")]
		[WebInvoke(Method = "GET",
			ResponseFormat = WebMessageFormat.Json,
			BodyStyle = WebMessageBodyStyle.Wrapped,
			UriTemplate = "Event?userToken={userToken}&eventId={eventId}")]
		string Event(string userToken, int eventId);
	}
}
